<template>
<div>
   
     <Son @aa="write" :father="father" />
   {{result.data}}
    {{result.data2}}
</div>

</template>
<script>
import { ref,reactive } from '@vue/reactivity'
import Son from './Son.vue'

export default {
  data(){
      return{
          datas:""
      }

  },
  components: {
    Son
  },
  setup () {

    const result=reactive({
          data:""
          ,data2:"222"


    })
    const write = (e) => {
      // this.datas=e.value;
     result.data=e.value;
    }
    const father = ref('我是父组件我要在子组件显示')
    return {
      father
      ,write
    ,result
    }
  }
}
</script>

